import java.util.HashMap;
import java.util.Vector;

/***
 * 
 *  A class that holds the search results and their (gt) rank
 *
 */

public class RankedResults extends SearchResults
{
	class RankedDoc
	{
		public RankedDoc(int id, int rank)
		{
			mId = id;
			mRank = rank;
		}
		public int mId;
		public int mRank;
	}
	
	HashMap<Integer, Vector<RankedDoc>> mRankResults = new HashMap<Integer, Vector<RankedDoc>>();
	
	public void AddResults(int query_id, int doc_id, int rank)
	{		
		super.AddResults(query_id, doc_id);
		if (!mRankResults.containsKey(query_id))
		{
			mRankResults.put(query_id, new Vector<RankedDoc>());
			
		}
		Vector<RankedDoc> ranked_doc_list = mRankResults.get(query_id);
		ranked_doc_list.add(new RankedDoc(doc_id, rank));
	}
}